package com.wangsb;

import java.util.Scanner;

/**
 * @Description: TODO
 * @author: shenbing.wang@hand-china
 * @date: 2021年05月23日 17:18
 */
public class HomeWorkUtils {
    public static boolean isRunYear(int year) {
        boolean yearFlag1 = year % 4 == 0;
        boolean yearFlag2 = year % 100 != 0;
        boolean yearFlag3 = year % 400 == 0;
        return (yearFlag1 && yearFlag2 || yearFlag3);
    }

    public static int getResult(int[] days, int month, int result) {
        for (int i = 1; i < month; i++) {
            result = result + days[i - 1];
        }
        return result;
    }

}
